import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant';

const production: AppRouteModule = {
  path: '/production',
  name: 'Production',
  component: LAYOUT,
  redirect: '/production/mandates',
  meta: {
    orderNo: 30,
    icon: 'ion:settings-outline',
    title: '生产管理',
  },
  children: [
    {
      path: 'mandates',
      name: 'ProductionMandates',
      component: LAYOUT,
      redirect: '/production/mandates/index',
      meta: {
        title: '生产任务',
      },
      children: [
        {
          path: 'index',
          name: 'MandatesIndex',
          component: () => import('@/views/production/mandates/index.vue'),
          meta: {
            title: '生产任务',
            permission: ['production:mandate:query'],
          },
        },
      ],
    },
  ],
};

export default production;
